//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { Faq, FaqResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooFaqList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<FaqResponse>(`/uctoo/faq/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooFaq = async (id: string) => {
  return requestClient.get<Faq>(`/uctoo/faq/${id}`);
};

export const adductooFaq = async (data: Partial<Faq>) => {
  return requestClient.post<Faq>('/uctoo/faq/add', data);
};

export const edituctooFaq = async (data: Partial<Faq>) => {
  return requestClient.post<Faq>('/uctoo/faq/edit', data);
};

export const deleteuctooFaq = async (id: string) => {
  return requestClient.post<any>('/uctoo/faq/del', { id });
};
